package com.winning.ds.common.service.impl;

import com.winning.ds.common.config.multiDatasource.DataSource;
import com.winning.ds.common.dao.CommonApiDao;
import com.winning.ds.common.dao.CommonLogApiDao;
import com.winning.ds.common.entity.SysEsbZcjgEntity;
import com.winning.ds.common.entity.SysLoginLogEntity;
import com.winning.ds.common.service.CommonLogApiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * description:
 *
 * @author yanxf@winning.com.cn
 * @date 2021/08/16 16:45
 */
@Service
public class CommonLogApiServiceImpl implements CommonLogApiService {

    @Autowired
    private CommonLogApiDao commonLogApiDao;

    @Autowired
    private CommonApiDao commonApiDao;


    @Override
    public void saveLoginLog(SysLoginLogEntity slle) {
        commonLogApiDao.insert(slle);
    }

    @Override
    @DataSource(DataSource.index)
    public SysEsbZcjgEntity getEsbJgInfo(String jgbm) {
        return commonApiDao.getEsbJgInfo(jgbm);
    }
}
